package com.yanxu.exception;

import com.yanxu.constant.ApiConstant;

/**
 * @author 折戟沉沙铁未销
 * @version V1.0
 * @date 2025-09-23-2025
 * @Description: 自定义全局异常类
 */
public class ParameterException extends RuntimeException {

    private Integer errorCode;

    public ParameterException() {
        super(ApiConstant.ERROR_MESSAGE);
        this.errorCode = ApiConstant.ERROR_CODE;
    }

    public ParameterException(Integer errorCode) {
        this.errorCode = errorCode;
    }


    public ParameterException(String errorMessage) {
        super(errorMessage);
        this.errorCode = ApiConstant.ERROR_CODE;
    }

    public ParameterException(Integer errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
    }




}